﻿// Copyright (c) Inossem. All rights reserved.
// Licensed under the LGPL-3.0 license. See LICENSE file in the project root for full license information.
using DWF.Studio.Plugin.Contract;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DWF.Studio.Plugin
{
    internal static class PluginParametersExtension
    {
        /// <summary>
        /// 添加字典到插件参数中
        /// </summary>
        /// <typeparam name="TValue"></typeparam>
        /// <param name="source"></param>
        /// <param name="dictionary"></param>
        public static void AddDictionary<TValue>(this PluginParameters source, IDictionary<string, TValue> dictionary)
        {
            foreach (var pair in dictionary)
            {
                source.Add(pair.Key, pair.Value);
            }
        }
    }
}
